<template>
	<view class="container">
		<view class="historical" v-for="(item,i) in order" :key="i" @click="toitem(item.url)">
			<view class="name">
				<view class="name-left">
					<view class="">{{item.job_name}}</view>
					<view class="order-text">{{item.number}}</view>
				</view>
				<view class="name-right">{{item.complete}}</view>
			</view>
			<view class="line"></view>
			<view class="article">
				<view class="article-text">{{item.order}}</view>
				<view class="bottom">
					<view class="time">{{item.time}}</view>
					<view class="money">{{item.commodity}}</view>
				</view>
			</view>
			<view class="but">
				<view class="invoice">{{item.invoice}}</view>
				<view class="evaluate invoice" @click="evaluate()">{{item.evaluate}}</view>
			</view>
		</view>
	</view>
</template>

<script>

	export default {
		data() {
			return {
				order:[{
					job_name:"福永同泰时代城店",
					number:"订单编号: ABCDEFGHIJKLMNO001",
					complete:"已完成",
					order:"霸气葡萄*1，霸气葡萄*1",
					time:"2020-05-08 19:19:42",
					commodity:"共2件商品，实付 ￥50.00",
					invoice:"查看发票",
					evaluate:"去评价",
					url:'/pages/take/orderdetail'
				},{
					job_name:"福永同泰时代城店",
					number:"订单编号: ABCDEFGHIJKLMNO002",
					complete:"已完成",
					order:"杨枝甘露宝藏茶*1，霸气芝士芒果*1，霸气绿...",
					time:"2020-05-05 19:19:42",
					commodity:"共2件商品，实付 ￥50.00",
					invoice:"查看发票",
					evaluate:"去评价",
					url:'/pages/take/orderdetail'
				},{
					job_name:"福永同泰时代城店",
					number:"订单编号: ABCDEFGHIJKLMNO002",
					complete:"已完成",
					order:"芝士奈雪金色山脉*1，芝士茉莉初雪*1",
					time:"2020-05-05 19:19:42",
					commodity:"共2件商品，实付 ￥50.00",
					invoice:"查看发票",
					evaluate:"去评价",
					url:'/pages/take/orderdetail'
				},{
					job_name:"福永同泰时代城店",
					number:"订单编号: ABCDEFGHIJKLMNO002",
					complete:"已完成",
					order:"霸气芝士芒果*1，霸气芝士芒果*1，霸气芝士...",
					time:"2020-05-05 19:19:42",
					commodity:"共2件商品，实付 ￥50.00",
					invoice:"查看发票",
					evaluate:"去评价",
					url:'/pages/take/orderdetail'
				},{
					job_name:"福永同泰时代城店",
					number:"订单编号: ABCDEFGHIJKLMNO002",
					complete:"已完成",
					order:"草莓魔法棒*1，报款红石榴*1",
					time:"2020-05-05 19:19:42",
					commodity:"共2件商品，实付 ￥50.00",
					invoice:"查看发票",
					evaluate:"去评价",
					url:'/pages/take/orderdetail'
				}]
			};
		},
		methods:{
			toitem(url){
				uni.navigateTo({
        url:url,
      });
			}
		}
	}
</script>

<style lang="scss" scoped>
	.container{
		background-color: #F0F8FA;
		border: 2rpx solid transparent;
		box-sizing: border-box;
		
		.historical{
			width: 90%;
			margin: 20rpx auto;
			background-color: #fff;
			
			// margin: 20rpx 0;
			.name{
				padding: 30rpx;
				display: flex;
				align-items: center;
				justify-content: space-between;
				.name-left{
					.order-text{
						font-size: 28rpx;
						color: #98989D;
						margin-top: 10rpx;
					}
				}
				.name-right{
					color: #C6CE75;
				}
			}
			.line{
				width: 100%;
				height: 2rpx;
				background-color: #F2F2F2;
			}
			.article{
				padding: 30rpx;
				.article-text{
					overflow: hidden;
					text-overflow: ellipsis;
					white-space: nowrap;
				}
				
				.bottom{
					display: flex;
					justify-content: space-between;
					font-size: 24rpx;
					margin-top: 10rpx;
				}
			}
			.but{
				padding-bottom: 20rpx;
				display: flex;
				padding: 0 30rpx;
				justify-content: flex-end;
				padding-bottom: 40rpx;
				.invoice{
					margin-left: 20rpx;
					border: 2rpx solid #B0BB40;
					background-color: #fff;
					color: #B4C156;
					padding: 20rpx;
					border-radius: 10rpx;
				}
			}
		}
	}
</style>
